#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/i2c.h>

struct i2c_client *sfh7771_client;

static struct i2c_board_info __initdata sfh7771_i2c_device = {
	I2C_BOARD_INFO("sfh7771", 0x38),
};

static int __init sfh7771_device_init(void)
{
	struct i2c_adapter *adapt;

	adapt = i2c_get_adapter(0);
	sfh7771_client = i2c_new_device(adapt, &sfh7771_i2c_device);
	i2c_put_adapter(adapt);

	return 0;
}

static void __exit sfh7771_device_exit(void)
{
	i2c_unregister_device(sfh7771_client);
}

module_init(sfh7771_device_init);
module_exit(sfh7771_device_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Yuyaowen");
